.class public Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;
.super Landroid/app/Dialog;
.source "UserLoginDialog.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private mQQBtn:Landroid/view/View;

.field private mTipsTxt:Landroid/widget/TextView;

.field private mWeiboBtn:Landroid/view/View;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 26
    const v0, 0x7f0d001a

    invoke-direct {p0, p1, v0}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    .line 27
    const v0, 0x7f0c009a

    invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->initDialog(Ljava/lang/String;)V

    .line 28
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "tips"    # Ljava/lang/String;

    .prologue
    .line 31
    const v0, 0x7f0d001a

    invoke-direct {p0, p1, v0}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    .line 32
    invoke-direct {p0, p2}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->initDialog(Ljava/lang/String;)V

    .line 33
    return-void
.end method

.method private initDialog(Ljava/lang/String;)V
    .registers 11
    .param p1, "tips"    # Ljava/lang/String;

    .prologue
    const/high16 v8, 0x43a00000

    const/high16 v7, 0x43480000

    const/4 v6, 0x1

    .line 36
    const v5, 0x7f030087

    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->setContentView(I)V

    .line 38
    const v5, 0x7f0a00a4

    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 39
    .local v0, "contentView":Landroid/view/View;
    invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    .line 40
    .local v2, "params":Landroid/view/ViewGroup$LayoutParams;
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    .line 41
    .local v1, "metrics":Landroid/util/DisplayMetrics;
    iget v4, v1, Landroid/util/DisplayMetrics;->xdpi:F

    .line 43
    .local v4, "xdpi":F
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->getWindow()Landroid/view/Window;

    move-result-object v5

    invoke-virtual {v5}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

    move-result-object v3

    .line 44
    .local v3, "winParams":Landroid/view/WindowManager$LayoutParams;
    const/high16 v5, 0x3f000000

    iput v5, v3, Landroid/view/WindowManager$LayoutParams;->dimAmount:F

    .line 45
    const/16 v5, 0x11

    iput v5, v3, Landroid/view/WindowManager$LayoutParams;->gravity:I

    .line 46
    iget v5, v3, Landroid/view/WindowManager$LayoutParams;->flags:I

    or-int/lit8 v5, v5, 0x2

    iput v5, v3, Landroid/view/WindowManager$LayoutParams;->flags:I

    .line 48
    cmpl-float v5, v4, v8

    if-lez v5, :cond_7b

    .line 49
    const/high16 v5, 0x43a80000

    invoke-static {v6, v5, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v5

    float-to-int v5, v5

    iput v5, v2, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 50
    invoke-static {v6, v7, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v5

    float-to-int v5, v5

    iput v5, v2, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 56
    :goto_4e
    const v5, 0x7f0a01d0

    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/TextView;

    iput-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->mTipsTxt:Landroid/widget/TextView;

    .line 57
    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->mTipsTxt:Landroid/widget/TextView;

    invoke-virtual {v5, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 59
    const v5, 0x7f0a01d1

    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->findViewById(I)Landroid/view/View;

    move-result-object v5

    iput-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->mWeiboBtn:Landroid/view/View;

    .line 60
    const v5, 0x7f0a01d2

    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->findViewById(I)Landroid/view/View;

    move-result-object v5

    iput-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->mQQBtn:Landroid/view/View;

    .line 62
    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->mWeiboBtn:Landroid/view/View;

    invoke-virtual {v5, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 63
    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->mQQBtn:Landroid/view/View;

    invoke-virtual {v5, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 64
    return-void

    .line 52
    :cond_7b
    invoke-static {v6, v8, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v5

    float-to-int v5, v5

    iput v5, v2, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 53
    invoke-static {v6, v7, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v5

    float-to-int v5, v5

    iput v5, v2, Landroid/view/ViewGroup$LayoutParams;->height:I

    goto :goto_4e
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .registers 5
    .param p1, "v"    # Landroid/view/View;

    .prologue
    .line 68
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_2c

    .line 79
    :goto_7
    return-void

    .line 70
    :pswitch_8
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->getContext()Landroid/content/Context;

    move-result-object v1

    sget-object v2, Lcn/sharesdk/sina/weibo/SinaWeibo;->NAME:Ljava/lang/String;

    invoke-static {v1, v2}, Lcn/sharesdk/framework/ShareSDK;->getPlatform(Landroid/content/Context;Ljava/lang/String;)Lcn/sharesdk/framework/Platform;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/brixd/niceapp/service/LoginService;->authorize(Landroid/content/Context;Lcn/sharesdk/framework/Platform;)V

    goto :goto_7

    .line 73
    :pswitch_1a
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserLoginDialog;->getContext()Landroid/content/Context;

    move-result-object v1

    sget-object v2, Lcn/sharesdk/tencent/qzone/QZone;->NAME:Ljava/lang/String;

    invoke-static {v1, v2}, Lcn/sharesdk/framework/ShareSDK;->getPlatform(Landroid/content/Context;Ljava/lang/String;)Lcn/sharesdk/framework/Platform;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/brixd/niceapp/service/LoginService;->authorize(Landroid/content/Context;Lcn/sharesdk/framework/Platform;)V

    goto :goto_7

    .line 68
    :pswitch_data_2c
    .packed-switch 0x7f0a01d1
        :pswitch_8
        :pswitch_1a
    .end packed-switch
.end method
